FROM centos:7

##修改镜像时区
ENV TZ=Asia/Shanghai

# 设置环境变量
ENV TARS_INSTALL /usr/local/app/tars/
ENV MOUNT_DATA false
ENV MASTER 0.0.0.0

RUN yum makecache fast; yum install -y yum-utils unzip which psmisc net-tools gdb zlib kde-l10n-Chinese
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
RUN echo $TZ > /etc/timezone
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
RUN yum clean all
RUN rm -rf /var/cache/yum

# 拷贝发布件到容器
RUN mkdir -p ${TARS_INSTALL}
COPY node.tgz ${TARS_INSTALL}

# 拷贝安装脚本
COPY install.sh /root/init/
COPY entrypoint.sh /sbin/

RUN chmod 777 /sbin/entrypoint.sh
ENTRYPOINT [ "/sbin/entrypoint.sh", "slave" ]

